<template>
	<view class="my-page">
		<u-navbar leftIconColor="#ffffff" :autoBack="true" :placeholder="true" bgColor="rgba(255,255,255,0.0)">
			<view slot="center" class="nav-title">
				账号设置
			</view>
		</u-navbar>
		<view class="box">
			<view class="item" @click="gonavto(1)">
				<view class="item-text">
					修改登录密码
				</view>
				<view class="item-right">
					<u-icon name="arrow-right" color="#999999" size="18"></u-icon>
				</view>
			</view>
			<view class="item" @click="gonavto(2)">
				<view class="item-text">
					修改支付密码
				</view>
				<view class="item-right">
					<u-icon name="arrow-right" color="#999999" size="18"></u-icon>
				</view>
			</view>
			<view class="item" @click="gonavto(3)">
				<view class="item-text">
					修改个人信息
				</view>
				<view class="item-right">
					<u-icon name="arrow-right" color="#999999" size="18"></u-icon>
				</view>
			</view>
		</view>
		<view class="btn">
			<u-button style="color: #000;" size="large" shape="circle" color="linear-gradient(255.89deg, #FFF0E3 6.94%, #D7B39A 87.16%)" type="primary" text="退出登录"
				@click="show = true"></u-button>
		</view>
		<u-modal :show="show" title="提示" :showCancelButton="true" @cancel="show = false" @confirm="confirm">
			<view class="slot-content">
				确认退出登录吗
			</view>
		</u-modal>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false,

			}
		},
		methods: {
			gonavto(id) {
				if (id == 1 || id == 2) {
					uni.navigateTo({
						url: '/pages/my/set/modify?id=' + id
					})
				} else if (id == 3) {
					uni.navigateTo({
						url: '/pages/my/set/about'
					})
				}
			},
			confirm() {
				this.show = false
				uni.removeStorageSync('token');
				uni.reLaunch({
					url: '/pages/login/index'
				})
			}
		}
	}
</script>
<style>
	page {
		background: #000000;
	}
</style>
<style lang="scss" scoped>
	.my-page {
		padding: 30rpx;

		.nav-title {
			color: #ffffff;
		}

		.box {
			background: #1A1A1B;
			border: 0.5px solid #FFFFFF1A;
			padding: 30rpx;
			opacity: 0.9;
			border-radius: 20rpx;

			.item {
				padding-bottom: 30rpx;
				border-bottom: 0.5px solid #FFFFFF1A;
				margin-bottom: 30rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;

				.item-text {
					font-size: 28rpx;
					color: #ffffff;
				}

				.item-right {
					display: flex;
					align-items: center;

					.right-cont {
						display: flex;
						align-items: center;
						margin-right: 10rpx;

						.dot {
							width: 12rpx;
							height: 12rpx;
							border-radius: 50%;
							background-color: #FF3F3F;
						}

						.right-text {
							font-size: 28rpx;
							color: #999999;
							margin-left: 10rpx;
						}
					}
				}
			}

			.item:last-child {
				border: none;
				margin-bottom: 0;
				padding-bottom: 0;
			}
		}

		.btn {
			margin-top: 30rpx;
		}
	}
</style>